<? $page_title='专项采购' ?>

<?include "FASHION/page_header.phtml"?>

<script language="JavaScript">
$(document).ready(function(){
	ajax_form({id:'form1', success:function(){location.reload();}, before:function(){ return check_amount() && confirm('确认提交专项采购吗？');}});
});
</script>

<form method="post" id="form1">
<table border="0" width="100%"><tbody>
<tr>
	<td class="nowrap" width="80">部门：</td>
	<td><?$user.dept_name?></td>
	<td></td>
	<td></td>
	<td class="nowrap right" width="100">单号：</td>
	<td class="gray">保存后生成</td>
</tr>
<tr>
	<td class="nowrap">采购类型：</td>
	<td>专项采购</td>
	<td></td>
	<td></td>
	<td class="nowrap right">日期：</td>
	<td><?=date('Y/m/d')?></td>
</tr>
<tr><td colspan="6">
	<table border=0 class="list" width="100%" id="stuff_list"><tbody>
		<tr class="nobg">
			<td colspan="9" class="left"><?=htmlutil::search_wares('addit')?></td>
		</tr>
		<tr class="nobg">
			<th>材料编号</th>
			<th>材料名称</th>
			<th>品牌</th>
			<th>规格</th>
			<th>单位</th>
			<th>采购数量</th>
			<th>用途</th>
			<th>备注</th>
			<th width="40">&nbsp;</th>
		</tr>
<{if $stuffs}>
<{foreach item=ware from=$stuffs}>
	<tr id="selstf_<{$ware.ware_id}>">
		<td><{$ware.sno}>&nbsp;</td>
		<td><{$ware.name}>&nbsp;</td>
		<td><{$ware.brand}></td>
		<td><{$ware.specific}></td>
		<td><{$ware.unit}></td>
		<td style="padding:0;"><input type="text" name="amount[<{$ware.ware_id}>]" value='<? $ware.amount?>' size="5" class="decimal"
			onfocus="chkdig_int(this)" onblur="do_stuff_total()" /></td>
		<td style="padding:0;" width="120"><input type="text" name="remark_use[<{$ware.ware_id}>]" value='<? $ware.remark_use ?>' size="8" style="width:98%;" /></td>
		<td style="padding:0;" width="120"><input type="text" name="remark[<{$ware.ware_id}>]" value='<? $ware.remark ?>' size="8" style="width:98%;" /></td>
		<td><a href="javascript:;" onclick="$('#selstf_<{$ware.ware_id}>').remove();do_stuff_total();">取消</a></td>
	</tr>
<{/foreach}>
<{/if}>
	</tbody></table>
</td></tr>
<tr>
	<td colspan="6" class="center">
		<br/> <input type="submit" value="提交专项采购" class="submit" />
<{if $ismodify}>
		<input type="hidden" name="demand_id" value="<{$demand.id}>" />
		<input type="hidden" name="sno" value="<{$demand.sno}>" />
<{/if}>
	</td>
</tr>
</tbody></table>
<?=Html::hidden('dept_id', $user.dept_id)?>
</form>

<?include "FASHION/page_footer.phtml"?>